import request from "@/utils/request";

const BASE_URL= '/admin/system/sysRole/'
export default {
  getPageList(page,limit,searchObject) {
    return request(
      {
        url:`${BASE_URL}/${page}/${limit}`,
        method: 'get',
        data: searchObject
      }
    )
  },

  deleteByID(id) {
    return request(
      {
        url:`${BASE_URL}/delete/${id}`,
        method: 'delete',
        data:id
      }
    )
  },
  updateRole(roleObject){
    return request({
      url:`${BASE_URL}/updateRoleById`,
      method :'post',
      data: roleObject
    }
    )
  },
  addRole(roleObject){
    return request({
        url:`${BASE_URL}/addRole`,
        method :'post',
        data: roleObject
      }
    )
  },
  batchRemove(ids){
    return request({
      url:`${BASE_URL}/batchRemove`,
      method: 'delete',
      data: ids
    })
  },
  toAssign(userId){
    return request({
      url:`${BASE_URL}/toAssign/${userId}`,
      method:'get',
      data:userId
    });
  },
  doAssign(AssignMenuVo) {
    return request({
      url:`${BASE_URL}/doAssign`,
      method:'post',
      data:AssignMenuVo

    });
  }

}




